/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view.frontend;

import java.awt.Dimension;
import javax.swing.*;
import view.generaldesign.DesignLayout;

/**
 *
 * @author Junjie
 */
public class StorageListPanel extends JPanel
{

    public StorageListPanel(model.StorageList storageList) 
    {
        setLayout(null);
        setBounds(0, 0, 800, 30);
        setBorder(DesignLayout.T_FIELD_RED);
        setBackground(DesignLayout.T_FIELD_BG_COLOR);
        
        JLabel lblProductFamily = new JLabel(storageList.getProductFamilyName().getName());
        lblProductFamily.setFont(DesignLayout.STANDARD);
        lblProductFamily.setBounds(10, 0, 500, 30);
        
        JLabel lblNumber = new JLabel("" +storageList.getNumber());
        lblNumber.setHorizontalAlignment(SwingConstants.CENTER);
        lblNumber.setFont(DesignLayout.STANDARD);
        lblNumber.setBounds(480, 0, 100, 30);
        
        JLabel lblPurchasePrice = new JLabel("" + storageList.getPurchasePrice());
        lblPurchasePrice.setHorizontalAlignment(SwingConstants.CENTER);
        lblPurchasePrice.setFont(DesignLayout.STANDARD);
        lblPurchasePrice.setBounds(590, 0, 100, 30);
        
        JLabel lblSalesPrice = new JLabel("" + storageList.getSalesPrice());
        lblSalesPrice.setHorizontalAlignment(SwingConstants.CENTER);
        lblSalesPrice.setFont(DesignLayout.STANDARD);
        lblSalesPrice.setBounds(700, 0, 100, 30);
        
        add(lblProductFamily);
        add(lblNumber);
        add(lblPurchasePrice);
        add(lblSalesPrice);
    }
}
